<template>
	<view>
        <view class="bar">
            <view>
                <image style="width: 100rpx;height: 100rpx;border: 5rpx solid #E5E5E5; border-radius: 100%;" src="../../static/images/icon.png" mode=""></image>
            </view>
            <view style="color: white;justify-content: left;">
                <view>WorkingDog</view>
                <view>记账-本没有意义,是坚持赋予了其意义.</view>
            </view>
        </view>
        <uni-list>
            <uni-list-item title="推荐给朋友" thumb="/static/images/fenxiang_blue.png" note="" @click="waiting()"></uni-list-item>
            <uni-list-item title="数据备份"  thumb="/static/images/fuzhi_blue.png" note="" @click="backupDB()"></uni-list-item>
            <uni-list-item title="设置" thumb="/static/images/shezhi_blue.png" note="" @click="waiting()"></uni-list-item>
        </uni-list>
	</view>
</template>

<script>
    import util from '../../common/script/util.js';
	export default {
		data() {
			return {
				
			}
		},
		methods: {
            waiting:function(){
                uni.showToast({
                    title:'开发中,敬请期待!',
                    position:"bottom"
                })
            },
			backupDB:function(){
                console.log("要备份了");
                util.db.backupDB();
                setTimeout(()=>{
                    uni.showToast({
                        title:'备份成功!',
                        position:"bottom"
                    })
                },200)
            }
		}
	}
</script>

<style>
    .bar {
        display: flex;
    }
    
    .bar {
        height: 100rpx;
        background-color: #2b85e4;
        align-items: center;
        justify-content: space-around;
        padding-top: 20rpx;
        padding-bottom: 20rpx;
    }
    
    .bar-item {
        /* width: 30%; */
        color: white;
        text-align: center;
    }
    .item {
        justify-content: space-between;
        align-items: center;
    }
    
    .item-left {
        display: flex;
        align-items: center;
    }
    
    .item-img {
        width: 50rpx;
        height: 50rpx;
    }
    
    .item-text {
        padding-left: 22rpx;
    }
    .list {
        padding: 20px;
        font-size: 28rpx;
        line-height: 3em;
    }
    
    .bottom-line {
        border-bottom: 1rpx solid #eee;
    }
</style>
